Frontend Forever App
We have a mobile app for you to download and use. And you can unlock many features in the app.
Get it now
Intall Later
Run
HTML
CSS
Javascript
Output
Document
Login
Username
Password
Sign in
FRONTEND FOREVER
@charset "UTF-8"; @import url(https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,600,700,800); *, :after, :before { box-sizing: border-box; padding: 0; margin: 0; } body{ font-family: sans-serif; min-height: 100vh; display: flex; justify-content: center; align-items: center; cursor: pointer; perspective: 1000px; } .container{ width: 70%; display: flex; justify-content: center; align-items: center; } .box{ min-height: 70vh; width: 70%; background: black; border-radius: 30px; box-shadow: 5px 5px 6px rgba(0,0,0,.5), -5px -5px 6px rgba(0,0,0,.5); flex-wrap: wrap; display: flex; justify-content: center; align-items: center; transform-style: preserve-3d; transition: .2s; } h1{ font-size: 50px; color: #FC00FF; position: relative; margin-left: 1rem; display: flex; align-items: center; } .form{ min-width: 50%; min-height: 50vh; color: white; transition: all .5s ease-out; } label{ font-size: 20px; font-family: Arial; line-height: 2; font-weight: 500; padding-left: 20px; } input{ width: 12rem; outline: none; border: none; color: white; background: transparent; border-bottom: 1px solid white; margin-left: 20px; padding-top: 15px; } button{ outline: none; display: flex; align-items: center; padding: 5px 80px; border-radius: 30px; margin-left: 1rem; margin-top: 2rem; background: #CF00F0; color: white; } #man{ width: 15rem; height: 15rem; position: relative; bottom: -6rem; right: 7rem; z-index: 2; transition: all .5s ease-out; } #youtube{ width: 5rem; height: 5rem; position: absolute; top: 3rem; right: 8rem; z-index: 5; transition: all .5s ease-out; } h2{ position: absolute; color: white; right: 4rem; top: 10rem; text-align: center; text-shadow: 2px 2px 2px black; max-width: 200px; font-size: 40px; line-height: 1.2; z-index: 3; transition: all .5s ease-out; } .path{ position: absolute; min-height: 100%; width: 100%; background: linear-gradient(90deg, #00DBDe 0%, #FC00FF 100%); clip-path: circle(350px at right 130px); border-radius: 30px; z-index: 1; }
const box = document.querySelector('.box'); const container = document.querySelector('.container'); const head = document.querySelector('#head'); const man = document.querySelector('#man'); const youtube = document.querySelector('#youtube'); const form = document.querySelector('#form'); container.addEventListener("mousemove" , (e)=>{ let horizontal = (window.innerWidth / 2 - e.pageX) / 25; let vertical = (window.innerHeight / 2 - e.pageY) / 25; box.style.transform = `rotateX(${vertical}deg) rotateY(${horizontal}deg)`; }); container.addEventListener("mouseenter" , (e)=>{ box.style.transition= ".1s"; head.style.transform = "translateZ(120px)"; man.style.transform = "translateZ(150px)"; youtube.style.transform = "translateZ(130px)"; form.style.transform = "translateZ(100px)"; }); container.addEventListener("mouseleave" , (e)=>{ box.style.transition= ".1s"; box.style.transform = "rotateY(0deg) rotateX(0deg)"; head.style.transform = "translateZ(0px)"; man.style.transform = "translateZ(0px)"; youtube.style.transform = "translateZ(0px)"; form.style.transform = "translateZ(0px)"; });